/*********************************************************************************
  *FileName:  nsuc16xx_rcc.h
  *Version:  V1.0
  *Date: 2023-04-07
**********************************************************************************/

#ifndef  __nsuc16xx_rcc_H__
#define  __nsuc16xx_rcc_H__

/***************************************Includes***********************************/
#include "nsuc16x0.h"


/***************************************Macros***********************************/

#define RCC_APBPeriph_Clock               ((uint32_t)0x00010000)
#define RCC_AHBPeriph_Clock               ((uint32_t)0x00020000)

#define RCC_APBPeriph_SPI                 ((uint32_t)0x00000001)
#define RCC_APBPeriph_LINUART             ((uint32_t)0x00000002)
#define RCC_APBPeriph_LINPORT             ((uint32_t)0x00000004)
#define RCC_APBPeriph_PWMIO               ((uint32_t)0x00000008)
#define RCC_APBPeriph_TIM0                ((uint32_t)0x00000010)
#define RCC_APBPeriph_TIM1                ((uint32_t)0x00000020)
#define RCC_APBPeriph_CAPCMP              ((uint32_t)0x00000040)

#define RCC_AHBPeriph_EEPROM              ((uint32_t)0x00000001)
#define RCC_AHBPeriph_GPIO                ((uint32_t)0x00000002)
#define RCC_AHBPeriph_ADC                 ((uint32_t)0x00000004)
#define RCC_AHBPeriph_DAC                 ((uint32_t)0x00000008)
#define RCC_AHBPeriph_PWM                 ((uint32_t)0x00000010)



/***************************************Variables***********************************/



/***************************************Functions***********************************/
void SYSCTRL_Unlock(void);
void RCC_SystemClockControl(uint32_t RCC_ClockSource, FunctionalState NewState);
void RCC_APBPeriphClockCmd(uint32_t RCC_APBPeriph, FunctionalState NewState);
void RCC_AHBPeriphClockCmd(uint32_t RCC_AHBPeriph, FunctionalState NewState);

#endif
/* [] END OF nsuc16xx_rcc.h */
